home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / polySelConstraintPanel.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.2 KB  |  107 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // $RCSfile: polySelConstraintPanel.mel $
  19. //
  20. // $Source: /vobs/aw/Maya/src/PolyUISlice/UI/scripts/polySelConstraintPanel.mel $
  21. //
  22. // $Author: lmiller $
  23. // $Revision: /main/5 $
  24. // $Date: 2000/02/23 11:44:12 $
  25. //
  26. // Script:    polySelConstraintPanel.mel
  27. //
  28. //
  29. //
  30. // SYNOPSIS
  31. //            Creates the mel components around the polySelConstraintEditor
  32. //
  33. //AUTHOR    Marianne Devaux - March, 1997
  34. //
  35.  
  36. global proc polySelectionConstraintPanel(string $panelName) 
  37. {
  38.     global string $gMainPane;
  39.     if (!`scriptedPanelType -exists polySelectionConstraintPanel`) {
  40.         scriptedPanelType
  41.             -unique true
  42. //            -createCallback "createPolySelConstraintWindow" 
  43. //            -deleteCallback "deletePolySelConstraintWindow" 
  44.             -addCallback     "addPolySelConstraintWindow" 
  45.             -removeCallback "removePolySelConstraintWindow" 
  46.             polySelectionConstraintPanel;
  47.         
  48.         setParent $gMainPane;
  49.         scriptedPanel -unParent -type "polySelectionConstraintPanel"
  50.             $panelName;
  51.     }
  52. }
  53.  
  54. //global proc createPolySelConstraintWindow(string $whichPanel)
  55. //{
  56. //}
  57.  
  58. //global proc deletePolySelConstraintWindow(string $whichPanel)
  59. //{
  60. //}
  61.  
  62. global proc buildPolyConstraintContextHelpItems(string $nameRoot, string $menuParent)
  63. //
  64. //  Description:
  65. //        Build context sensitive menu items
  66. //        
  67. //  Input Arguments:
  68. //        $nameRoot - name to use as the root of all item names
  69. //        $menuParent - the name of the parent of this menu
  70. //
  71. //  Return Value:
  72. //      None
  73. //
  74. {
  75.     menuItem -label "Help on Selection Constraints..."
  76.         -enableCommandRepeat false
  77.         -command "showHelp SelectionConstraints";
  78. }
  79.  
  80. global proc addPolySelConstraintWindow(string $whichPanel)
  81. {
  82.     int $menusOkayInPanels = `optionVar -q allowMenusInPanels`;
  83.     panel -e -mbv $menusOkayInPanels $whichPanel;
  84.  
  85.     //  Build Menubar.
  86.     menu -l "Reset"
  87.         ($whichPanel+"resetMenu");
  88.     menuItem -l "Disable All"
  89.         -c ("resetPolySelectConstraint; polygonConstraintUpdate(\"" + $whichPanel + "\");")
  90.         ($whichPanel+"resetMenuDisable");
  91.  
  92.     //    Add support for the Context Sensitive Help Menu.
  93.     //
  94.     addContextHelpProc $whichPanel "buildPolyConstraintContextHelpItems";
  95.  
  96.     // create Monitor
  97.     polySelectConstraintMonitor -create;
  98.     // fill panel
  99.     polygonConstraint($whichPanel);
  100. }
  101.  
  102. global proc removePolySelConstraintWindow(string $whichPanel)
  103. {
  104.     // delete Monitor
  105.     polySelectConstraintMonitor -delete;
  106. }
  107.